<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<s:include value="/commun/header.jsp" />


<div id="body">

<h2>Profil</h2>

<table>
	<tr>
		<td id="info">Login</td>
		<td id="infovalue"><s:property value="agent.utilisateur.login"/></td>
	</tr>
	<tr>
		<td id="info">Adresse e-mail</td>
		<td id="infovalue"><s:property value="agent.utilisateur.adresseMail"/></td>
	</tr>
	<tr>
		<td id="info">Nom</td>
		<td id="infovalue"><s:property value="agent.nom"/></td>
	</tr>
	<tr>
		<td id="info" width="150">Prénom</td>
		<td id="infovalue"><s:property value="agent.prenom"/></td>
	</tr>
	<s:if test="%{#session.role=='client'}">
	</s:if>
	<s:else>
	<tr>
		<td id="info">Salaire</td>
		<td id="infovalue"><s:property value="agent.salaire"/></td>
	</tr>
	</s:else>
</table>
<s:if test="%{#session.role=='admin' || (#session.role=='agent' && #session.rid==agent.id)}">
<p><s:url id="update" action="setupForNewUpdateAgent"><s:param name="agent.id" value="agent.id"/></s:url>
		<s:a href="%{update}">Modifier mon profil</s:a>
		</p>
</s:if>
</div>
<s:include value="/commun/footer.jsp" />